<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">

    <title>My JSP 'login.jsp' starting page</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->

</head>

<body>
<script type="text/javascript" src="/js/public/jquery-1.11.2.min.js"></script>

<script >
    $(

        function () {


            $("#addOneChapter").submit(function (event) {

                if ($("#addTestMark").val() == "") {
                    alert('请选择文件');
                    return false;
                }





                var formData = new FormData(this);
                //				loading1.show();
                console.log(formData);
                $.ajax({
                    url: 'updateHeadIcon',
                    type: 'post',
                    data: formData,
                    async: false,
                    cache: false,
                    contentType: false,
                    processData: false,
                    success: function (msg) {
                        alert(msg)

                    }
                });
                return false;
            });

        });
</script>

<a href="TestMapWX">asas</a>
<form id="addOneChapter"  method="post" class="login-form" enctype="multipart/form-data" >
    <div class="form-group">
        章节名chapterName：<input type="text" name="bdImage" id="bdImage">
        类型addTestMark：<input type="file" name="apkFile" id="apkFile">

    </div>

    <button type="submit" class="btn">登录</button>
    <div class="clear"></div>

</form>
</body>
</html>
